import sys,time
import os
from CesuanJob import CesuanJob

def main(tmpl_no, cog_dest):

    try:
        tmpl_no = tmpl_no
        cog_dest = cog_dest
        success_tmp = True
        msg = ''
        timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
    except Exception as e:
        success_tmp = False
        msg = f'invalid_parameter_type--{str(e)}'
        timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
    if success_tmp:
        # try:
        #     message = CesuanJob(p_tmpl_no=tmpl_no, p_cog_dest=cog_dest).execute()
        #     timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
        #     success_tmp = True
        #     msg = message
        # except Exception as e:
        #     success_tmp = False
        #     msg = f'run_model_job_failed---with--{str(e)}'
        #     timestamp = None
        message = CesuanJob(p_tmpl_no=tmpl_no, p_cog_dest=cog_dest).execute()
        timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
        success_tmp = True
        msg = message
    success = success_tmp
    message = msg
    timestamp = timestamp
    return success, message, timestamp
if __name__ == '__main__':
    success, message, timestamp = main(tmpl_no='202309_01', cog_dest='发电')
    print(success, message, timestamp)
